import request from '@/utils/request'

// 查询订单管理列表
export function listOrderInfo(query) {
  return request({
    url: '/business/orderInfo/list',
    method: 'get',
    params: query
  })
}

// 查询订单管理详细
export function getOrderInfo(baseId) {
  return request({
    url: '/business/orderInfo/' + baseId,
    method: 'get'
  })
}

// 新增订单管理
export function addOrderInfo(data) {
  return request({
    url: '/business/orderInfo',
    method: 'post',
    data: data
  })
}

// 修改订单管理
export function updateOrderInfo(data) {
  return request({
    url: '/business/orderInfo',
    method: 'put',
    data: data
  })
}

// 删除订单管理
export function delOrderInfo(orderNo, reason) {
  return request({
    url: '/v1/pay/refunds?orderNo=' + orderNo + '&reason=' + reason,
    method: 'post',
  })
}
